import request from '@/utils/request'

export default {
    createOrders(courseId) {
        return request({
            url: `/eduorder/order/saveOrder/${courseId}`,
            method: 'post'
        })
    },
    
    getOrdersInfo(id) {
        return request({
            url: '/eduorder/order/getOrderInfoById/' + id,
            method: 'get'
        })
    },

    //生成二维码
    createNative(orderNo){
        return request({
            url: '/eduorder/paylog/createNative/' + orderNo,
            method: 'get'
        })
    },
    //查询订单状态的方法
    //生成二维码的方法
    queryPayStatus(orderNo) {
        return request({
            url: '/eduorder/paylog/queryOrderStatus/' + orderNo,
            method: 'get'
        })
    },
    isBuyCourse(courseId, memeberId) {
        return request({
            url: '/eduorder/paylog/isBuyCourse/' + courseId + '/' + memeberId,
            method: 'get'
        })
    }
}